package com.wutong.erb.entity.resource;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wutong.erb.entity.BaseEntity;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 资源表
 * @author wutong
 */
@TableName(value = "resource", autoResultMap = true)
@Data
@EqualsAndHashCode(callSuper = true)
public class Resource extends BaseEntity {
    public enum ResourceType {
        VIDEO, PPT, PDF, DOC, IMAGE, AUDIO
    }
    @TableField("chapter_id")
    private Long chapterId;
    @TableField("title")
    @Size(max = 100)
    private String title;
    @TableField("description")
    private String description;
    @TableField("type")
    private ResourceType type;
    @TableField("url")
    private String url;
    @TableField("duration")
    private Integer duration;
    @TableField("file_size")
    private Long fileSize;
}

